import React, { useState } from 'react'
import './index.css'
import hangIcon from '../../../assets/image/牛肉面.png'
import { Button } from 'antd-mobile';
import { useNavigate } from 'react-router-dom';




export default function OrderDone() {
    const history = useNavigate();
    const [list, setList] = useState([1, 2, 4]);

    const jumpPage = () => {
        history('/doorOrder')
    };

    return (
        <>
            <div className='cate_banner'>
                {
                    list.map((item: any) => {
                        return (
                            <div className='orderDone_hang'>
                                <h3 className='orderDone_hang_tittle'>
                                    <span>
                                        牛肉面
                                    </span>
                                    <span className='orderDone_hang_fant orderDone_hang_time'>
                                        &nbsp; 2024-4-20
                                    </span>
                                </h3>
                                <div className='orderDone_hang_start'>
                                    <img src={hangIcon} alt="" className='orderDone_hang_img' />
                                    <div className='orderDone_hang_mess'>
                                        <div className='orderDone_hang_fant orderDone_hang_name'>
                                            辣 / 小份 / 不要葱
                                        </div>
                                        <div className='orderDone_hang_fant orderDone_hang_name'>
                                            共计 1 份商品
                                        </div>
                                    </div>
                                </div>
                                <div className='orderDone_hang_end'>
                                    <div className='orderDone_hang_price'>
                                        合计：30元
                                    </div>
                                    <Button
                                        size='small'
                                        color='default'
                                        className='orderDone_hang_btn'
                                        onClick={() => jumpPage()}
                                    >
                                        再来一单
                                    </Button>
                                </div>
                                <div className='ribbon' >
                                    <span>
                                        畅销
                                    </span>
                                </div>
                            </div>
                        )
                    })
                }
            </div>
        </>
    )
}
